﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EQT.Dal;
using EQT.Model;

public partial class SelectClientInfo : System.Web.UI.Page
{
    private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
    private DaClientInfo dalClent = new DaClientInfo();
    private UserContext context;

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Expires = -1;
        if (!IsPostBack)
        {
            AspNetPager.PageSize = 15;
            this.BtnQuery_Click(null, null);
        }
    }

    protected void AspNetPager_PageChanged(object sender, EventArgs e)
    {
        this.BtnQuery_Click(null, null);
    }

    protected void BtnQuery_Click(object sender, EventArgs e)
    {
        int pagecount = 0;
        //这里查询员工信息并绑定到gridview上。
        string strCondition = "where 1=1 ";
        if (sender != null && e != null)
        {
            AspNetPager.CurrentPageIndex = 0;
        }
        this.ClientGridView.DataSource = dalClent.GetClientRecords(strCondition, AspNetPager.PageSize, AspNetPager.CurrentPageIndex - 1, out pagecount);

        ClientGridView.DataBind();

        AspNetPager.RecordCount = pagecount;
    }

}
